import time
import os
import logging
logging.basicConfig(level=logging.INFO,format='%(asctime)s -%(levelname)s -%(process)d -%(module)s -%(funcName)s -%(message)s')

while True:
    
    with open(os.path.dirname(__file__)+"/com.txt","r+") as file:
        cmd=file.read()
        logging.info(cmd)

    with open(os.path.dirname(__file__)+"/com.txt","w+") as file:
        file.write("")

    time.sleep(2)